package business;

import java.util.Set;

/**
 * 
 * @author Joao Pires 2011
 *
 */

public class ProfessorFacade{

	/**
	 * this will create a facade for a certain teacher providing him with some methods for teacher use
	 */
	Professor p;

	/**
	 * @param p the teacher for which we are creating the facade
	 */
	public ProfessorFacade(Professor p){
		this.p = p;
	}
	
	/**
	 * Resgisters a grade on a certain course for a certain student
	 * 
	 * @param d The subject for which the grade is being set
	 * @param a	The student for which the grade is being set
	 * @param n	The grade
	 */
	public void lancaResultado(Disciplina d, Aluno a, int n){
		p.lancaResultado(d, a, n);
	}
	
	
	/**
	 * 
	 * @return a set with all the Students
	 */
	
	public Set<Aluno> getAllAlunos(){
		return Aluno.objectos();
	}
	
	/**
	 * prints out all the students
	 */
	
	public void listarTodosOsAlunos(){
		Set<Aluno> alunos = Aluno.objectos();
		for (Aluno a: alunos){
			System.out.println(a);
		}
	}
	
	/**
	 * prints out the details for a given student
	 * @param a	the aluno for which we want the details
	 */
	public void obterDetalhesAluno(Aluno a){
		System.out.println("#"+a.getNome()+"#");
		for (Disciplina d: a.disciplinas()){
			System.out.println(d.getNome());
		}
	}
}
